From 80ba38a0b365f65104e481f17047bf5f343b0980 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 22 Mar 2021 15:34:31 +0100 Subject: [PATCH] x11/dnd: Ignore XErrors from the COW The DnD code for X11 adds the composite overlay window (aka COW) to the cache. Yet the X11 requests to get and release the COW may trigger XErrors that we ought to ignore otherwise the client will abort. Fixes: #3715 --- gdk/x11/gdkdrag-x11.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c index d8c9ac28b8..d82d3a7d4b 100644 --- a/gdk/x11/gdkdrag-x11.c +++ b/gdk/x11/gdkdrag-x11.c @@ -581,12 +581,14 @@ gdk_surface_cache_new (GdkDisplay *display) */ if (gdk_display_is_composited (display)) { + gdk_x11_display_error_trap_push (display); cow = XCompositeGetOverlayWindow (xdisplay, xroot_window); gdk_surface_cache_add (result, cow, 0, 0, WidthOfScreen (GDK_X11_SCREEN (screen)->xscreen), HeightOfScreen (GDK_X11_SCREEN (screen)->xscreen), TRUE); XCompositeReleaseOverlayWindow (xdisplay, xroot_window); + gdk_x11_display_error_trap_pop_ignored (display); } #endif -- 2.30.2